home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / AEDataModel.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  20.7 KB  |  560 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        AEDataModel.h
  3.  
  4.      Contains:    AppleEvent Data Model Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1996-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __AEDATAMODEL__
  18. #define __AEDATAMODEL__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __MIXEDMODE__
  25.     #include <MixedMode.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. /* Apple event descriptor types */
  52. enum {
  53.     typeBoolean                    = FOUR_CHAR_CODE('bool'),
  54.     typeChar                    = FOUR_CHAR_CODE('TEXT')
  55. };
  56.  
  57. /* Preferred numeric Apple event descriptor types */
  58. enum {
  59.     typeSInt16                    = FOUR_CHAR_CODE('shor'),
  60.     typeSInt32                    = FOUR_CHAR_CODE('long'),
  61.     typeUInt32                    = FOUR_CHAR_CODE('magn'),
  62.     typeSInt64                    = FOUR_CHAR_CODE('comp'),
  63.     typeIEEE32BitFloatingPoint    = FOUR_CHAR_CODE('sing'),
  64.     typeIEEE64BitFloatingPoint    = FOUR_CHAR_CODE('doub'),
  65.     type128BitFloatingPoint        = FOUR_CHAR_CODE('ldbl'),
  66.     typeDecimalStruct            = FOUR_CHAR_CODE('decm')
  67. };
  68.  
  69. /* Non-preferred Apple event descriptor types */
  70. enum {
  71.     typeSMInt                    = typeSInt16,
  72.     typeShortInteger            = typeSInt16,
  73.     typeInteger                    = typeSInt32,
  74.     typeLongInteger                = typeSInt32,
  75.     typeMagnitude                = typeUInt32,
  76.     typeComp                    = typeSInt64,
  77.     typeSMFloat                    = typeIEEE32BitFloatingPoint,
  78.     typeShortFloat                = typeIEEE32BitFloatingPoint,
  79.     typeFloat                    = typeIEEE64BitFloatingPoint,
  80.     typeLongFloat                = typeIEEE64BitFloatingPoint,
  81.     typeExtended                = FOUR_CHAR_CODE('exte')
  82. };
  83.  
  84. /* More Apple event descriptor types */
  85. enum {
  86.     typeAEList                    = FOUR_CHAR_CODE('list'),
  87.     typeAERecord                = FOUR_CHAR_CODE('reco'),
  88.     typeAppleEvent                = FOUR_CHAR_CODE('aevt'),
  89.     typeEventRecord                = FOUR_CHAR_CODE('evrc'),
  90.     typeTrue                    = FOUR_CHAR_CODE('true'),
  91.     typeFalse                    = FOUR_CHAR_CODE('fals'),
  92.     typeAlias                    = FOUR_CHAR_CODE('alis'),
  93.     typeEnumerated                = FOUR_CHAR_CODE('enum'),
  94.     typeType                    = FOUR_CHAR_CODE('type'),
  95.     typeAppParameters            = FOUR_CHAR_CODE('appa'),
  96.     typeProperty                = FOUR_CHAR_CODE('prop'),
  97.     typeFSS                        = FOUR_CHAR_CODE('fss '),
  98.     typeKeyword                    = FOUR_CHAR_CODE('keyw'),
  99.     typeSectionH                = FOUR_CHAR_CODE('sect'),
  100.     typeWildCard                = FOUR_CHAR_CODE('****'),
  101.     typeApplSignature            = FOUR_CHAR_CODE('sign'),
  102.     typeQDRectangle                = FOUR_CHAR_CODE('qdrt'),
  103.     typeFixed                    = FOUR_CHAR_CODE('fixd'),
  104.     typeSessionID                = FOUR_CHAR_CODE('ssid'),
  105.     typeTargetID                = FOUR_CHAR_CODE('targ'),
  106.     typeProcessSerialNumber        = FOUR_CHAR_CODE('psn '),
  107.     typeKernelProcessID            = FOUR_CHAR_CODE('kpid'),
  108.     typeDispatcherID            = FOUR_CHAR_CODE('dspt'),
  109.     typeNull                    = FOUR_CHAR_CODE('null')        /* null or nonexistent data */
  110. };
  111.  
  112. /* Keywords for Apple event attributes */
  113. enum {
  114.     keyTransactionIDAttr        = FOUR_CHAR_CODE('tran'),
  115.     keyReturnIDAttr                = FOUR_CHAR_CODE('rtid'),
  116.     keyEventClassAttr            = FOUR_CHAR_CODE('evcl'),
  117.     keyEventIDAttr                = FOUR_CHAR_CODE('evid'),
  118.     keyAddressAttr                = FOUR_CHAR_CODE('addr'),
  119.     keyOptionalKeywordAttr        = FOUR_CHAR_CODE('optk'),
  120.     keyTimeoutAttr                = FOUR_CHAR_CODE('timo'),
  121.     keyInteractLevelAttr        = FOUR_CHAR_CODE('inte'),        /* this attribute is read only - will be set in AESend */
  122.     keyEventSourceAttr            = FOUR_CHAR_CODE('esrc'),        /* this attribute is read only */
  123.     keyMissedKeywordAttr        = FOUR_CHAR_CODE('miss'),        /* this attribute is read only */
  124.     keyOriginalAddressAttr        = FOUR_CHAR_CODE('from')        /* new in 1.0.1 */
  125. };
  126.  
  127.  
  128. /*    Constants used for specifying the factoring of AEDescLists. */
  129. enum {
  130.     kAEDescListFactorNone        = 0,
  131.     kAEDescListFactorType        = 4,
  132.     kAEDescListFactorTypeAndSize = 8
  133. };
  134.  
  135. /* Constants used creating an AppleEvent */
  136. enum {
  137.                                                                 /* Constant for the returnID param of AECreateAppleEvent */
  138.     kAutoGenerateReturnID        = -1,                            /* AECreateAppleEvent will generate a session-unique ID */
  139.                                                                 /* Constant for transaction ID's */
  140.     kAnyTransactionID            = 0                                /* no transaction is in use */
  141. };
  142.  
  143. /* Apple event manager data types */
  144. typedef ResType                         DescType;
  145. typedef FourCharCode                     AEKeyword;
  146. #if OPAQUE_TOOLBOX_STRUCTS
  147. typedef struct OpaqueAEDataStorage*     AEDataStorage;
  148. #else
  149. typedef Handle                             AEDataStorage;
  150. #endif  /* OPAQUE_TOOLBOX_STRUCTS */
  151.  
  152.  
  153. struct AEDesc {
  154.     DescType                         descriptorType;
  155.     AEDataStorage                     dataHandle;
  156. };
  157. typedef struct AEDesc                    AEDesc;
  158. typedef AEDesc *                        AEDescPtr;
  159.  
  160. struct AEKeyDesc {
  161.     AEKeyword                         descKey;
  162.     AEDesc                             descContent;
  163. };
  164. typedef struct AEKeyDesc                AEKeyDesc;
  165. /* a list of AEDesc's is a special kind of AEDesc */
  166.  
  167. typedef AEDesc                             AEDescList;
  168. /* AERecord is a list of keyworded AEDesc's */
  169. typedef AEDescList                         AERecord;
  170. /* an AEDesc which contains address data */
  171. typedef AEDesc                             AEAddressDesc;
  172. /* an AERecord that contains an AppleEvent, and related data types */
  173. typedef AERecord                         AppleEvent;
  174. typedef AppleEvent *                    AppleEventPtr;
  175. typedef SInt16                             AEReturnID;
  176. typedef SInt32                             AETransactionID;
  177. typedef FourCharCode                     AEEventClass;
  178. typedef FourCharCode                     AEEventID;
  179. typedef SInt8                             AEArrayType;
  180. enum {
  181.     kAEDataArray                = 0,
  182.     kAEPackedArray                = 1,
  183.     kAEDescArray                = 3,
  184.     kAEKeyDescArray                = 4
  185. };
  186.  
  187.  
  188. enum {
  189.     kAEHandleArray                = 2
  190. };
  191.  
  192.  
  193. union AEArrayData {
  194.     short                             kAEDataArray[1];
  195.     char                             kAEPackedArray[1];
  196.     Handle                             kAEHandleArray[1];
  197.     AEDesc                             kAEDescArray[1];
  198.     AEKeyDesc                         kAEKeyDescArray[1];
  199. };
  200. typedef union AEArrayData                AEArrayData;
  201. typedef AEArrayData *                    AEArrayDataPointer;
  202.  
  203. /**************************************************************************
  204.   These calls are used to set up and modify the coercion dispatch table.
  205. **************************************************************************/
  206. typedef CALLBACK_API( OSErr , AECoerceDescProcPtr )(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc);
  207. typedef CALLBACK_API( OSErr , AECoercePtrProcPtr )(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result);
  208. typedef STACK_UPP_TYPE(AECoerceDescProcPtr)                     AECoerceDescUPP;
  209. typedef STACK_UPP_TYPE(AECoercePtrProcPtr)                         AECoercePtrUPP;
  210. #if OPAQUE_UPP_TYPES
  211.     EXTERN_API(AECoerceDescUPP)
  212.     NewAECoerceDescUPP               (AECoerceDescProcPtr        userRoutine);
  213.  
  214.     EXTERN_API(AECoercePtrUPP)
  215.     NewAECoercePtrUPP               (AECoercePtrProcPtr        userRoutine);
  216.  
  217.     EXTERN_API(void)
  218.     DisposeAECoerceDescUPP           (AECoerceDescUPP            userUPP);
  219.  
  220.     EXTERN_API(void)
  221.     DisposeAECoercePtrUPP           (AECoercePtrUPP            userUPP);
  222.  
  223.     EXTERN_API(OSErr)
  224.     InvokeAECoerceDescUPP           (const AEDesc *            fromDesc,
  225.                                     DescType                toType,
  226.                                     long                    handlerRefcon,
  227.                                     AEDesc *                toDesc,
  228.                                     AECoerceDescUPP            userUPP);
  229.  
  230.     EXTERN_API(OSErr)
  231.     InvokeAECoercePtrUPP           (DescType                typeCode,
  232.                                     const void *            dataPtr,
  233.                                     Size                    dataSize,
  234.                                     DescType                toType,
  235.                                     long                    handlerRefcon,
  236.                                     AEDesc *                result,
  237.                                     AECoercePtrUPP            userUPP);
  238.  
  239. #else
  240.     enum { uppAECoerceDescProcInfo = 0x00003FE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  241.     enum { uppAECoercePtrProcInfo = 0x0003FFE0 };                     /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  242.     #define NewAECoerceDescUPP(userRoutine)                         (AECoerceDescUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, GetCurrentArchitecture())
  243.     #define NewAECoercePtrUPP(userRoutine)                             (AECoercePtrUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture())
  244.     #define DisposeAECoerceDescUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  245.     #define DisposeAECoercePtrUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  246.     #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), (toType), (handlerRefcon), (toDesc))
  247.     #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, (typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
  248. #endif
  249. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  250. #define NewAECoerceDescProc(userRoutine)                         NewAECoerceDescUPP(userRoutine)
  251. #define NewAECoercePtrProc(userRoutine)                         NewAECoercePtrUPP(userRoutine)
  252. #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userRoutine)
  253. #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userRoutine)
  254.  
  255. typedef UniversalProcPtr                 AECoercionHandlerUPP;
  256. EXTERN_API( OSErr )
  257. AEInstallCoercionHandler        (DescType                 fromType,
  258.                                  DescType                 toType,
  259.                                  AECoercionHandlerUPP     handler,
  260.                                  long                     handlerRefcon,
  261.                                  Boolean                 fromTypeIsDesc,
  262.                                  Boolean                 isSysHandler)                        THREEWORDINLINE(0x303C, 0x0A22, 0xA816);
  263.  
  264. EXTERN_API( OSErr )
  265. AERemoveCoercionHandler            (DescType                 fromType,
  266.                                  DescType                 toType,
  267.                                  AECoercionHandlerUPP     handler,
  268.                                  Boolean                 isSysHandler)                        THREEWORDINLINE(0x303C, 0x0723, 0xA816);
  269.  
  270. EXTERN_API( OSErr )
  271. AEGetCoercionHandler            (DescType                 fromType,
  272.                                  DescType                 toType,
  273.                                  AECoercionHandlerUPP *    handler,
  274.                                  long *                    handlerRefcon,
  275.                                  Boolean *                fromTypeIsDesc,
  276.                                  Boolean                 isSysHandler)                        THREEWORDINLINE(0x303C, 0x0B24, 0xA816);
  277.  
  278. /**************************************************************************
  279.   The following calls provide for a coercion interface.
  280. **************************************************************************/
  281. EXTERN_API( OSErr )
  282. AECoercePtr                        (DescType                 typeCode,
  283.                                  const void *            dataPtr,
  284.                                  Size                     dataSize,
  285.                                  DescType                 toType,
  286.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0A02, 0xA816);
  287.  
  288. EXTERN_API( OSErr )
  289. AECoerceDesc                    (const AEDesc *            theAEDesc,
  290.                                  DescType                 toType,
  291.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0603, 0xA816);
  292.  
  293.  
  294. /**************************************************************************
  295.  The following calls apply to any AEDesc. Every 'result' descriptor is
  296.  created for you, so you will be responsible for memory management
  297.  (including disposing) of the descriptors so created.  
  298. **************************************************************************/
  299. EXTERN_API( OSErr )
  300. AECreateDesc                    (DescType                 typeCode,
  301.                                  const void *            dataPtr,
  302.                                  Size                     dataSize,
  303.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0825, 0xA816);
  304.  
  305. EXTERN_API( OSErr )
  306. AEDisposeDesc                    (AEDesc *                theAEDesc)                            THREEWORDINLINE(0x303C, 0x0204, 0xA816);
  307.  
  308. EXTERN_API( OSErr )
  309. AEDuplicateDesc                    (const AEDesc *            theAEDesc,
  310.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0405, 0xA816);
  311.  
  312.  
  313. /**************************************************************************
  314.   The following calls apply to AEDescList. Since AEDescList is a subtype of
  315.   AEDesc, the calls in the previous section can also be used for AEDescList.
  316.   All list and array indices are 1-based. If the data was greater than
  317.   maximumSize in the routines below, then actualSize will be greater than
  318.   maximumSize, but only maximumSize bytes will actually be retrieved.
  319. **************************************************************************/
  320. EXTERN_API( OSErr )
  321. AECreateList                    (const void *            factoringPtr,
  322.                                  Size                     factoredSize,
  323.                                  Boolean                 isRecord,
  324.                                  AEDescList *            resultList)                            THREEWORDINLINE(0x303C, 0x0706, 0xA816);
  325.  
  326. EXTERN_API( OSErr )
  327. AECountItems                    (const AEDescList *        theAEDescList,
  328.                                  long *                    theCount)                            THREEWORDINLINE(0x303C, 0x0407, 0xA816);
  329.  
  330. EXTERN_API( OSErr )
  331. AEPutPtr                        (AEDescList *            theAEDescList,
  332.                                  long                     index,
  333.                                  DescType                 typeCode,
  334.                                  const void *            dataPtr,
  335.                                  Size                     dataSize)                            THREEWORDINLINE(0x303C, 0x0A08, 0xA816);
  336.  
  337. EXTERN_API( OSErr )
  338. AEPutDesc                        (AEDescList *            theAEDescList,
  339.                                  long                     index,
  340.                                  const AEDesc *            theAEDesc)                            THREEWORDINLINE(0x303C, 0x0609, 0xA816);
  341.  
  342. EXTERN_API( OSErr )
  343. AEGetNthPtr                        (const AEDescList *        theAEDescList,
  344.                                  long                     index,
  345.                                  DescType                 desiredType,
  346.                                  AEKeyword *            theAEKeyword,
  347.                                  DescType *                typeCode,
  348.                                  void *                    dataPtr,
  349.                                  Size                     maximumSize,
  350.                                  Size *                    actualSize)                            THREEWORDINLINE(0x303C, 0x100A, 0xA816);
  351.  
  352. EXTERN_API( OSErr )
  353. AEGetNthDesc                    (const AEDescList *        theAEDescList,
  354.                                  long                     index,
  355.                                  DescType                 desiredType,
  356.                                  AEKeyword *            theAEKeyword,
  357.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0A0B, 0xA816);
  358.  
  359. EXTERN_API( OSErr )
  360. AESizeOfNthItem                    (const AEDescList *        theAEDescList,
  361.                                  long                     index,
  362.                                  DescType *                typeCode,
  363.                                  Size *                    dataSize)                            THREEWORDINLINE(0x303C, 0x082A, 0xA816);
  364.  
  365. EXTERN_API( OSErr )
  366. AEGetArray                        (const AEDescList *        theAEDescList,
  367.                                  AEArrayType             arrayType,
  368.                                  AEArrayDataPointer     arrayPtr,
  369.                                  Size                     maximumSize,
  370.                                  DescType *                itemType,
  371.                                  Size *                    itemSize,
  372.                                  long *                    itemCount)                            THREEWORDINLINE(0x303C, 0x0D0C, 0xA816);
  373.  
  374. EXTERN_API( OSErr )
  375. AEPutArray                        (AEDescList *            theAEDescList,
  376.                                  AEArrayType             arrayType,
  377.                                  const AEArrayData *    arrayPtr,
  378.                                  DescType                 itemType,
  379.                                  Size                     itemSize,
  380.                                  long                     itemCount)                            THREEWORDINLINE(0x303C, 0x0B0D, 0xA816);
  381.  
  382. EXTERN_API( OSErr )
  383. AEDeleteItem                    (AEDescList *            theAEDescList,
  384.                                  long                     index)                                THREEWORDINLINE(0x303C, 0x040E, 0xA816);
  385.  
  386.  
  387. /**************************************************************************
  388.  The following calls apply to AERecord. Since AERecord is a subtype of
  389.  AEDescList, the calls in the previous sections can also be used for
  390.  AERecord an AERecord can be created by using AECreateList with isRecord
  391.  set to true. 
  392. **************************************************************************/
  393. /*
  394.   Note: The following #defines map "key" calls on AERecords into "param" calls on 
  395.   AppleEvents.  Although no errors are currently returned if AERecords are 
  396.   passed to "param" calls and AppleEvents to "key" calls, the behavior of 
  397.   this type of API-mixing is not explicitly documented in Inside Macintosh.  
  398.   It just happens that the "key" calls have the same functionality as their 
  399.   "param" counterparts.  Since none of the "key" calls are currently available 
  400.   in the PowerPC IntefaceLib, the #defines exploit the fact that "key" and 
  401.   "param" routines can be used interchangeably, and makes sure that every 
  402.   invokation of a "key" API becomes an invokation of a "param" API.
  403. */
  404. #define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) \
  405.     AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), (dataSize))
  406. #define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) \
  407.     AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
  408. #define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize) \
  409.     AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), (dataPtr), (maxSize), (actualSize))
  410. #define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result) \
  411.     AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
  412. #define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize) \
  413.     AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
  414. #define AEDeleteKeyDesc(theAERecord, theAEKeyword) \
  415.     AEDeleteParam((theAERecord), (theAEKeyword))
  416. /**************************************************************************
  417.   The following calls create and manipulate the AppleEvent data type.
  418. **************************************************************************/
  419. EXTERN_API( OSErr )
  420. AECreateAppleEvent                (AEEventClass             theAEEventClass,
  421.                                  AEEventID                 theAEEventID,
  422.                                  const AEAddressDesc *    target,
  423.                                  AEReturnID             returnID,
  424.                                  AETransactionID         transactionID,
  425.                                  AppleEvent *            result)                                THREEWORDINLINE(0x303C, 0x0B14, 0xA816);
  426.  
  427.  
  428. /**************************************************************************
  429.   The following calls are used to pack and unpack parameters from records
  430.   of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  431.   in the previous sections can also be used for variables of type
  432.   AppleEvent. The next six calls are in fact identical to the six calls
  433.   for AERecord.
  434. **************************************************************************/
  435. EXTERN_API( OSErr )
  436. AEPutParamPtr                    (AppleEvent *            theAppleEvent,
  437.                                  AEKeyword                 theAEKeyword,
  438.                                  DescType                 typeCode,
  439.                                  const void *            dataPtr,
  440.                                  Size                     dataSize)                            THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);
  441.  
  442. EXTERN_API( OSErr )
  443. AEPutParamDesc                    (AppleEvent *            theAppleEvent,
  444.                                  AEKeyword                 theAEKeyword,
  445.                                  const AEDesc *            theAEDesc)                            THREEWORDINLINE(0x303C, 0x0610, 0xA816);
  446.  
  447. EXTERN_API( OSErr )
  448. AEGetParamPtr                    (const AppleEvent *        theAppleEvent,
  449.                                  AEKeyword                 theAEKeyword,
  450.                                  DescType                 desiredType,
  451.                                  DescType *                typeCode,
  452.                                  void *                    dataPtr,
  453.                                  Size                     maximumSize,
  454.                                  Size *                    actualSize)                            THREEWORDINLINE(0x303C, 0x0E11, 0xA816);
  455.  
  456. EXTERN_API( OSErr )
  457. AEGetParamDesc                    (const AppleEvent *        theAppleEvent,
  458.                                  AEKeyword                 theAEKeyword,
  459.                                  DescType                 desiredType,
  460.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0812, 0xA816);
  461.  
  462. EXTERN_API( OSErr )
  463. AESizeOfParam                    (const AppleEvent *        theAppleEvent,
  464.                                  AEKeyword                 theAEKeyword,
  465.                                  DescType *                typeCode,
  466.                                  Size *                    dataSize)                            THREEWORDINLINE(0x303C, 0x0829, 0xA816);
  467.  
  468. EXTERN_API( OSErr )
  469. AEDeleteParam                    (AppleEvent *            theAppleEvent,
  470.                                  AEKeyword                 theAEKeyword)                        THREEWORDINLINE(0x303C, 0x0413, 0xA816);
  471.  
  472.  
  473.  
  474. /**************************************************************************
  475.  The following calls also apply to type AppleEvent. Message attributes are
  476.  far more restricted, and can only be accessed through the following 5
  477.  calls. The various list and record routines cannot be used to access the
  478.  attributes of an event. 
  479. **************************************************************************/
  480. EXTERN_API( OSErr )
  481. AEGetAttributePtr                (const AppleEvent *        theAppleEvent,
  482.                                  AEKeyword                 theAEKeyword,
  483.                                  DescType                 desiredType,
  484.                                  DescType *                typeCode,
  485.                                  void *                    dataPtr,
  486.                                  Size                     maximumSize,
  487.                                  Size *                    actualSize)                            THREEWORDINLINE(0x303C, 0x0E15, 0xA816);
  488.  
  489. EXTERN_API( OSErr )
  490. AEGetAttributeDesc                (const AppleEvent *        theAppleEvent,
  491.                                  AEKeyword                 theAEKeyword,
  492.                                  DescType                 desiredType,
  493.                                  AEDesc *                result)                                THREEWORDINLINE(0x303C, 0x0826, 0xA816);
  494.  
  495. EXTERN_API( OSErr )
  496. AESizeOfAttribute                (const AppleEvent *        theAppleEvent,
  497.                                  AEKeyword                 theAEKeyword,
  498.                                  DescType *                typeCode,
  499.                                  Size *                    dataSize)                            THREEWORDINLINE(0x303C, 0x0828, 0xA816);
  500.  
  501. EXTERN_API( OSErr )
  502. AEPutAttributePtr                (AppleEvent *            theAppleEvent,
  503.                                  AEKeyword                 theAEKeyword,
  504.                                  DescType                 typeCode,
  505.                                  const void *            dataPtr,
  506.                                  Size                     dataSize)                            THREEWORDINLINE(0x303C, 0x0A16, 0xA816);
  507.  
  508. EXTERN_API( OSErr )
  509. AEPutAttributeDesc                (AppleEvent *            theAppleEvent,
  510.                                  AEKeyword                 theAEKeyword,
  511.                                  const AEDesc *            theAEDesc)                            THREEWORDINLINE(0x303C, 0x0627, 0xA816);
  512.  
  513. /**************************************************************************
  514.  The following calls are necessary to deal with opaque data in AEDescs, because the
  515.  traditional way of dealing with a basic AEDesc has been to dereference the dataHandle
  516.  directly.  This is not supported under Carbon.
  517. **************************************************************************/
  518. #if ACCESSOR_CALLS_ARE_FUNCTIONS
  519. /*
  520.         AEGetDescData no longer supports automatic coercion. If you'd like to
  521.         coerce the descriptor use AECoerceDesc.
  522.     */
  523. EXTERN_API( OSErr )
  524. AEGetDescData                    (const AEDesc *            theAEDesc,
  525.                                  void *                    dataPtr,
  526.                                  Size                     maximumSize);
  527.  
  528. EXTERN_API( Size )
  529. AEGetDescDataSize                (const AEDesc *            theAEDesc);
  530.  
  531. EXTERN_API( OSErr )
  532. AEReplaceDescData                (DescType                 typeCode,
  533.                                  const void *            dataPtr,
  534.                                  Size                     dataSize,
  535.                                  AEDesc *                theAEDesc);
  536.  
  537. #endif  /* ACCESSOR_CALLS_ARE_FUNCTIONS */
  538.  
  539.  
  540. #if PRAGMA_STRUCT_ALIGN
  541.     #pragma options align=reset
  542. #elif PRAGMA_STRUCT_PACKPUSH
  543.     #pragma pack(pop)
  544. #elif PRAGMA_STRUCT_PACK
  545.     #pragma pack()
  546. #endif
  547.  
  548. #ifdef PRAGMA_IMPORT_OFF
  549. #pragma import off
  550. #elif PRAGMA_IMPORT
  551. #pragma import reset
  552. #endif
  553.  
  554. #ifdef __cplusplus
  555. }
  556. #endif
  557.  
  558. #endif /* __AEDATAMODEL__ */
  559.  
  560.